package com.financing.wap.dao.impl;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
import com.financing.wap.dto.FpShopUserBackgroundDTO;
import com.financing.wap.dao.IFpShopUserBackgroundDao;
import com.financing.wap.common.SqlName;
/**
 * fp_shop_user_background  
 * 用户背景图片表 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("fpShopUserBackgroundDao")
public class FpShopUserBackgroundDaoImpl extends BaseDaoImpl<FpShopUserBackgroundDTO, java.lang.Integer> implements IFpShopUserBackgroundDao {


	@Override
	public int insert(FpShopUserBackgroundDTO fpShopUserBackground) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.FpShopUserBackgroundSql.insert, fpShopUserBackground);
	}

	@Override
	public void update(FpShopUserBackgroundDTO fpShopUserBackground) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.FpShopUserBackgroundSql.update, fpShopUserBackground);
	}

	@Override
	public void updateForce(FpShopUserBackgroundDTO fpShopUserBackground) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.FpShopUserBackgroundSql.updateForce, fpShopUserBackground);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClientTemplate.delete(SqlName.FpShopUserBackgroundSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<FpShopUserBackgroundDTO> queryList(FpShopUserBackgroundDTO fpShopUserBackground) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.FpShopUserBackgroundSql.queryList, fpShopUserBackground);
	}

	@Override
	public int queryListCount(FpShopUserBackgroundDTO fpShopUserBackground) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.FpShopUserBackgroundSql.queryListCount, fpShopUserBackground);
	}

	@Override
	public FpShopUserBackgroundDTO loadById(Integer id) throws SQLException {
		return  (FpShopUserBackgroundDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.FpShopUserBackgroundSql.loadById,id);
	}

	@Override
	public Class<FpShopUserBackgroundDTO> getEntityClass() {
		return FpShopUserBackgroundDTO.class;
	}
 	
}
